{template Public:Page:header}
<link href="/assets/css/dataTables.bootstrap.css" rel="stylesheet" />
<div class="container">
  <div class="row">
  
    {template Member:Index:sidebar}
    
    <div class="col-lg-10 well-col-pl-30">
      <div class="row">
            <div class="well">

                <h3>稿件管理</h3>
                
               <div class="row">
              <div class="col-lg-12">
                <div class="table-toolbar">
                  <div class="row">
                    <div class="col-lg-12">
                      <div class="text-right"> </div>
                    </div>
                  </div>
                  <div class="row">
                    <div>
                      <form action="/seller/task/index">
                        <div class="col-lg-2">
                          <input type="text" value="{echo $selectarray['oid']}" placeholder="编号" class="form-control" name="oid">
                          
                        </div>
                        
                        <div class="col-lg-2">
                          <input type="text" value="{echo $selectarray['buyer_uid']}" placeholder="雇主ID" class="form-control" name="buyer_uid">
                          
                        </div>
                        
                        
 						<div class="col-lg-2">
                          <select name="process">
                          	<option value=""{if !$_GET['process'] && !IsNum($_GET['process'])} selected="selected"{/if}>交易流程</option>
                            <option value="0"{if $_GET['process']==0 && IsNum($_GET['process'])} selected="selected"{/if}>待审核</option>
                            <option value="1"{if $selectarray['process']==1} selected="selected"{/if}>中标</option>
                            <option value="2"{if $selectarray['process']==2} selected="selected"{/if}>失败</option>
                            <option value="3"{if $_GET['process']==3} selected="selected"{/if}>待交接</option>
                            <option value="4"{if $_GET['process']==4} selected="selected"{/if}>待评价</option>
                          </select>
                          
                        </div>
                        
                        
                        <div class="col-lg-1">
                          <button class="btn btn-default" type="submit">搜索</button>
                          <input type="hidden" value="1" name="search">
                        </div>
                      </form>
                    </div>
                  </div>
                </div>
              </div>
            </div>
                
              <table id="editabledatatable" class="table table-striped table-hover table-bordered dataTable no-footer" aria-describedby="editabledatatable_info">
                <thead>
                  <tr role="row">
 
                      {foreach $orderarr $key=>$value}
                      <th onClick="window.location.href='{echo U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME.'/sqlorder/'.$key.'/iforder/'.$iforder.'/p/'.$pagenum)}'" tabindex="0" aria-controls="editabledatatable" rowspan="1" colspan="1"  aria-sort="ascending" aria-label="{echo $value['name']}" {if $key==$sqlorder} {if $iforder==2}  class="sorting_desc"{else} class="sorting_asc"{/if}{else} class="sorting"{/if}> {echo $value['name']} </th>
                      {/foreach}
                      
                      <th></th>
                  </tr>
                </thead>
                <tbody>
                
                
                	{if !empty($list)}
                        {foreach $list $value}
                            <tr>
                           		<td>
                                    {echo $value['oid']}
                                </td>
                                <td>
                                    {echo $value['buyer_uid']}
                                </td>
                           
                                <td>
                                    {echo $value['buyer_username']}
                                </td>
                                
                                <td>
                                    <a href="/task/{echo $value['id']}" target="_blank">{echo $value['subject']}</a>
                                </td>
                                
                                <td>
                                   {echo FormatDate("Y/m/d",$value['dateline'])}
                                </td>
                                <td>
                                    <span class="color_f60">￥{echo $value['money']/100}</span>
                                </td>
                                <td>
                                   {if $value['process']==0}未审核{elseif $value['process']==1}中标 {if $value['cid']==0}交接中{elseif $value['cid']>0 && $value['seller_is_evaluate']==0}评价中{/if}{else}失败{/if}
                                </td>
                                <td>
                                {if $value['process']!=1}<a href="/task/show/edit/id/{echo $value['id']}/oid/{echo $value['oid']}" target="_blank" class="btn btn-default btn-xs">编辑</a>{else}<a href="/task/{echo $value['id']}/{echo $value['oid']}" target="_blank" class="btn btn-default btn-xs">查看</a>{/if}
                                </td>
                            </tr>
                        {/foreach}
                    {/if}
                    
                </tbody>
            </table>
            
            {if $page}
            <p>
            <div class="dataTables_paginate paging_bootstrap text-right"><ul class="pagination">{echo $page}</ul></div>
            </p>
            {/if}    
            </div>
    </div>
  </div>
</div>
</div>

{template Public:Page:footer}